package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Together;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.TogetherQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TogetherMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Together entity);

    Together selectByPrimaryKey(Long id);

    List<Together> selectAll();

    int updateByPrimaryKey(Together entity);

    List<Together> selectForList(TogetherQueryObject qo);

    List<User> selectUserByTogetherId(@Param("togetherId") Long togetherId);

    User selectUserByTogether(@Param("togetherId") Long togetherId, @Param("userId") Long userId);

    void deleteFocus(@Param("togetherId") Long togetherId, @Param("userId") Long userId);

    void insertRelation(@Param("togetherId") Long togetherId, @Param("userId") Long userId);
}